package com.daxia.bumall.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * OrderDesigner
 */
@Entity
@Table(name = "orderdesigner") 
public class OrderDesigner extends BaseModel {
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	
	@ManyToOne()
	@JoinColumn(name = "city_id")
    private City city;
	
	/**
	 * 用户
	 */
	@ManyToOne
	@JoinColumn(name = "user_id")
    private User user;
	
	@ManyToOne
	@JoinColumn(name = "community_id")
	private Community community;
	/**
	 * 小区名称
	 */
	@Column(name = "communityName")
    private String communityName;
	/**
	 * 面积
	 */
	@Column(name = "area")
    private String area;
	/**
	 * 风格
	 */
	@ManyToOne
	@JoinColumn(name = "houseStyle_id")
    private HouseStyle houseStyle;
	/**
	 * 户型
	 */
	@ManyToOne
	@JoinColumn(name = "houseType_id")
    private HouseType houseType;
	/**
	 * 预约时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")	
	@Column(name = "orderTime")
    private Date orderTime;
	private String orderName;
	private String orderMobile;
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")	
	@Column(name = "createTime")
    private Date createTime;
	
	@ManyToOne
	@JoinColumn(name = "designer_id")
	private Designer designer;
	
	/**
	 * 是否已经抢单
	 */
	@Column(name = "status")
	private Integer status;
	
	@Column(name = "houseTypeImage")
	private String houseTypeImage;
	/**
	 * 预约来源
	 */
	@Column(name="order_from")
	private String from;
	
	@ManyToOne
	@JoinColumn(name="company_id")
	private Company company;
	
	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public String getFrom() {
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public User getUser() {
    	return user;
    }
	
    public void setUser(User user) {
    	this.user = user;
    }
	
	public String getCommunityName() {
    	return communityName;
    }
	
    public void setCommunityName(String communityName) {
    	this.communityName = communityName;
    }
	
	public String getArea() {
    	return area;
    }
	
    public void setArea(String area) {
    	this.area = area;
    }
	
	public HouseStyle getHouseStyle() {
    	return houseStyle;
    }
	
    public void setHouseStyle(HouseStyle houseStyle) {
    	this.houseStyle = houseStyle;
    }
	
	public HouseType getHouseType() {
    	return houseType;
    }
	
    public void setHouseType(HouseType houseType) {
    	this.houseType = houseType;
    }
	
	public Date getOrderTime() {
    	return orderTime;
    }
	
    public void setOrderTime(Date orderTime) {
    	this.orderTime = orderTime;
    }
	
	public Date getCreateTime() {
    	return createTime;
    }
	
    public void setCreateTime(Date createTime) {
    	this.createTime = createTime;
    }

	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}

	public Community getCommunity() {
		return community;
	}

	public void setCommunity(Community community) {
		this.community = community;
	}

	public String getOrderName() {
		return orderName;
	}

	public void setOrderName(String orderName) {
		this.orderName = orderName;
	}

	public String getOrderMobile() {
		return orderMobile;
	}

	public void setOrderMobile(String orderMobile) {
		this.orderMobile = orderMobile;
	}

	public Designer getDesigner() {
		return designer;
	}

	public void setDesigner(Designer designer) {
		this.designer = designer;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getHouseTypeImage() {
		return houseTypeImage;
	}

	public void setHouseTypeImage(String houseTypeImage) {
		this.houseTypeImage = houseTypeImage;
	}
	
	
	
}
